//
//  CZPageItem.m
//  ForChangZhou
//
//  Created by 蔺百好 on 2021/1/13.
//  Copyright © 2021 KMasker. All rights reserved.
//

#import "CZPageItem.h"

@implementation CZPageItem

- (void)setItemModel:(CZTopSegMentItemModel *)itemModel {
    _itemModel = itemModel;
    
    [self setTitle:itemModel.itemName forState:UIControlStateNormal];
    [self setTitle:itemModel.itemName forState:UIControlStateSelected];

}

- (void)setConfig:(CZPageConfig *)config {
    _config = config;
    
    [self setTitleColor:config.nomalColor forState:UIControlStateNormal];
    [self setTitleColor:config.selectColor forState:UIControlStateSelected];
    
    self.titleLabel.font = config.textFont;
}

- (void)setChosen:(BOOL)chosen {
    _chosen = chosen;
    self.selected = chosen;
    if (chosen == YES) {
        self.titleLabel.font = self.config.selectFont;
    }else {
        self.titleLabel.font = self.config.nomalFont;
    }
}

- (void)refreshTheme {

 
    

}

@end
